import React from 'react';
import {Routes, Route} from 'react-router-dom';
import NotFound from '../pages/NotFound';
import Login from '../pages/login';
import Editor from '../pages/editor';
import PrivateRoute from './privateRoute';

const AppRoutes = () => (
  <Routes>
    <Route path="/" element={<Login />} />
    <Route element={<PrivateRoute />}>
      <Route path="editor" element={<Editor />} />
    </Route>
    <Route path="*" element={<NotFound />} />
  </Routes>
);

export default AppRoutes;